
package clasesmath;

import java.util.*;
public class Mayor_And_Menor {

     public static void main (String [] args){

 Scanner sc=new Scanner(System.in);
        System.out.println("Introduce los numeros");
        int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),d=sc.nextInt();


        System.out.print("Minimo de (" + a + "," + b +"," + c+ ","+ d +") es ");
       int min=Math.min(a, b);
        min=Math.min(min, c);
        min=Math.min(min, d);

        System.out.println(min);
        System.out.print("Maximo de (" + a + "," + b +"," + c+ ","+ d +") es ");
        int max= Math.max(a, b);
         max= Math.max(max, c);
         max= Math.max(max, d);
        System.out.println(max);

     }
}
//Devuelve el valor mayor y menor de los numeros
//introducidos en la funcion

